import request from '@/sheep/request';

const addressApi = {
	list: () => {
		return request({
			url: '/member/address/list',
			method: 'GET',
		});
	},
	create: (data) => {
		return request({
			url: '/member/address/create',
			method: 'POST',
			data
		});
	},
	update: (data) => {
		return request({
			url: '/member/address/update',
			method: 'PUT',
			data
		});
	},
	delete: (id) => {
		return request({
			url: '/member/address/delete?id='+id,
			method: 'DELETE',
		});
	},
	get: (id) => {
		return request({
			url: '/member/address/get?id=' + id,
			method: 'GET',
		});
	},
};

export default addressApi;